package com.acminds.fotoporter.persistence.entities;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the ADVERTISEMENT database table.
 * 
 */
@Entity
@Table(name="ADVERTISEMENT")
public class Advertisement extends com.acminds.fotoporter.persistence.BaseDTO implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="ADVERTISEMENT_ID")
	private int advertisementId;

    @Temporal( TemporalType.DATE)
	@Column(name="EFFECTIVE_DATE")
	private Date effectiveDate;

    @Temporal( TemporalType.DATE)
	@Column(name="EXPIRY_DATE")
	private Date expiryDate;

	@Column(name="PRICE")
	private BigDecimal price;

	@Column(name="UNITS")
	private int units;

	//uni-directional many-to-one association to Image
    @ManyToOne
	@JoinColumn(name="IMAGE_ID")
	private Image image;

	//bi-directional many-to-one association to Client
    @ManyToOne
	@JoinColumn(name="CLIENT_ID")
	private Client client;

	//bi-directional many-to-one association to UserInfo
    @ManyToOne
	@JoinColumn(name="CREATED_BY")
	private UserInfo userInfo;

    public Advertisement() {
    }

	public int getAdvertisementId() {
		return this.advertisementId;
	}

	public void setAdvertisementId(int advertisementId) {
		this.advertisementId = advertisementId;
	}

	public Date getEffectiveDate() {
		return this.effectiveDate;
	}

	public void setEffectiveDate(Date effectiveDate) {
		this.effectiveDate = effectiveDate;
	}

	public Date getExpiryDate() {
		return this.expiryDate;
	}

	public void setExpiryDate(Date expiryDate) {
		this.expiryDate = expiryDate;
	}

	public BigDecimal getPrice() {
		return this.price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public int getUnits() {
		return this.units;
	}

	public void setUnits(int units) {
		this.units = units;
	}

	public Image getImage() {
		return this.image;
	}

	public void setImage(Image image) {
		this.image = image;
	}
	
	public Client getClient() {
		return this.client;
	}

	public void setClient(Client client) {
		this.client = client;
	}
	
	public UserInfo getUserInfo() {
		return this.userInfo;
	}

	public void setUserInfo(UserInfo userInfo) {
		this.userInfo = userInfo;
	}
	
}